from src.model.base_model import BaseModel, db


class Classroom(BaseModel):
    __tablename__ = "classrooms"

    classroom_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    classroom_name = db.Column(db.String(255), unique=True, nullable=False)
    classroom_teacher_id = db.Column(db.Integer, nullable=True)


class AttendanceFlag(BaseModel):
    __tablename__ = "attendance_flags"

    attendance_flag_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    attendance_student_name = db.Column(db.String(255), nullable=False)
    attendance_teacher_name = db.Column(db.String(255), nullable=False)
    attendance_classroom_name = db.Column(db.String(255), nullable=False)
    attendance_time = db.Column(db.DateTime, nullable=False)
    attendance_is = db.Column(db.Boolean, nullable=False)


class Emails(BaseModel):
    email_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    email = db.Column(db.String(255), nullable=False)
    email_name = db.Column(db.String(255), nullable=False)
